
interface stateType {
    breadArr: any;
}
export type Action = { type: string; payload: stateType[]}


const reducer = (state: stateType, action: Action) => {
    
    switch (action.type) {
        case "MENU_NEW": 
            state.breadArr = action.payload.breadArr;
            break;
        default: 
            break;
    }
    return {...state};
};

export default reducer;